package org.zhadoop.stream.cql.hooks;

import org.zhadoop.stream.cql.DriverContext;
import org.zhadoop.stream.cql.exception.SemanticAnalyzerException;
import org.zhadoop.stream.cql.semanticanalyzer.analyzecontext.AnalyzeContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.ParseContext;

/**
 * previous函数检查
 * 
 * 1.previous 函数可以放在任何地方，select子句、where、having以及聚合表达式中
 * 2.select 子句中,如果previous 中包含多列，是不允许设置别名的
 * 3.where 和 having 子句以及aggregate 表达式中，不允许出现包含多列的
 * @author zwd
 *
 */
public class PreviousValidateHook implements SemanticAnalyzeHook {

	@Override
	public boolean validate(ParseContext parseContext) throws SemanticAnalyzerException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void preAnalyze(DriverContext context, ParseContext parseContext) throws SemanticAnalyzerException {

	}

	@Override
	public void postAnalyze(DriverContext context, AnalyzeContext analyContext) throws SemanticAnalyzerException {
		
	}

}
